import 'package:flutter/material.dart';

import '../config.dart';

class RoundedInkWell extends StatelessWidget {
  final Widget child;
  final VoidCallback? onTap;
  final double borderRadius;
  final Color splashColor;
  final Color highlightColor;

  RoundedInkWell({
    Key? key,
    required this.child,
    this.onTap,
    this.borderRadius = 4.0,
    Color? splashColor,
    Color? highlightColor,
  })  : splashColor = splashColor ??
            LxWidgetsLibraryService.to.colorType.color7.withOpacity(0.3),
        highlightColor = highlightColor ??
            LxWidgetsLibraryService.to.colorType.color7.withOpacity(0.5),
        super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWell(
      borderRadius: BorderRadius.circular(borderRadius),
      onTap: onTap,
      splashColor: splashColor,
      highlightColor: highlightColor,
      child: child,
    );
  }
}
